<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document.prototype属性</title>
    <script type="text/javascript">
        document.write('<div>' + document.doctype.name + '</div>');
        document.write('<div>' + document.title + '</div>');
        console.log(document.head);
        document.write('<div>' + document.head + '</div>');
        console.log(document.body);
        document.write('<div>' + document.body + '</div>');

        console.log(document.firstChild, document.firstElementChild);
        console.log(document.lastChild, document.lastElementChild);
        console.log(document.children);
    </script>
</head>

<body>
</body>

</html>